import {yearDayLine} from "@/utils/util"
import api from '@/utils/api.js'

export default {
  data: [
    {
      name: '每月班级幼儿午检统计表',
      url: 'afternoon_check/month_export',
      query: {
        // start_time: yearDayLine(new Date())
        month: '',
        section_id: '',
        class_id: ''
      },
      getPower: {
        'section_id': {
          name: 'section_id', // key名称
          default: '', // 默认值
          propertyType: "Select", // 组件名称
          placeholder: '年段', // 默认值
          valueText: '', // 值
          leve: 2,
          api: api.user_sectionindex, // 下拉框的请求接口
          keyName: 'section_name',// 调用的字段
          child: [
            {
              name: 'class_id',
              default: '',
              propertyType: "",
              placeholder: '班级',
              valueText: '',
              api: api.user_classesindex,
              keyName: 'class_name',
            }
          ]
        }
      },
      needQuery: ['month'],
      disabled: ['month', 'class_id'],
      fileName: ['month']
    },
    {
      name: '全日异常记录表',
      url: 'check_export/all_check',
      query: {
        // start_time: yearDayLine(new Date())
        start_time: '',// 开始时间（必须）
        end_time: '',// 结束时间（必须）
        section_id: '',
        class_id: '',// 班级（非必须）
        regionTime: []
      },
      getPower: {
        'section_id': {
          name: 'section_id', // key名称
          default: '', // 默认值
          propertyType: "Select", // 组件名称
          placeholder: '年段', // 默认值
          valueText: '', // 值
          leve: 2,
          api: api.user_sectionindex, // 下拉框的请求接口
          keyName: 'section_name',// 调用的字段
          child: [
            {
              name: 'class_id',
              default: '',
              propertyType: "",
              placeholder: '班级',
              valueText: '',
              api: api.user_classesindex,
              keyName: 'class_name',
            }
          ]
        }
      },
      needQuery: ['regionTime'],
      disabled: ['regionTime'],
      fileName: ['regionTime']
    }
  ]
}
